package cn.javasea.web.commandLineRunner.runner;

import cn.javasea.web.commandLineRunner.config.PrintConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
/**
 * @author https://www.jianshu.com/u/3bd57d5f1074
 * @date 2019-12-24 10:50:00
 **/
@Component
@Order(1)
public class OrderRunner1 implements CommandLineRunner {

    @Autowired
    private OrderRunner2 orderRunner2;

    @Autowired
    private PrintConfig printConfig;

    @Override
    public void run(String... args) throws Exception {
        System.out.println("---------- runner1 --------");
        System.out.println("The OrderRunner1 start to initialize ..." + orderRunner2);
        System.out.println(printConfig.getCompanyName());
        System.out.println("========== runner1 ========");
    }
}
